<?php
/**
 * Created by PhpStorm.
 * User: 68008000
 * Date: 2017/11/14
 * Time: 16:25
 */

namespace app\common\model;


use think\Db;
use think\Loader;
use think\Model;
use think\Session;

/**
 *标签模型
 */
class Tag extends Model
{
    //连接数据库
    protected $table= 'tag';
    protected $pk= 'tid';
    //添加、编辑标签
    public function add($data)
    {


        //编辑标签
        $tid = input('param.tid');


//        // 添加标签
//        $result = $this->validate(true)->save($data);
//        if(false === $result){
//            // 验证失败 输出错误信息
//            return ['valid'=>0,'msg'=>$this->getError()];
//        }else{
//            return ['valid'=>1,'msg'=>'添加成功'];
//        }
    }

}